#ifndef TCHECKBOXDELEGATE_H
#define TCHECKBOXDELEGATE_H

#include <QSqlRelationalDelegate>
#include <QMouseEvent>
#include <QCheckBox>
class TCheckBoxDelegate : public QSqlRelationalDelegate
{
    Q_OBJECT
public:
    TCheckBoxDelegate();

    // QAbstractItemDelegate interface
public:
    void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;

    // QAbstractItemDelegate interface
public:
    bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index);
signals:
    void clicked(QAbstractItemModel *model,const QModelIndex &index);
};

#endif // TCHECKBOXDELEGATE_H
